package model;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class Order {
    private String orderId;
    private List<Item> items;
    private OrderStatus status;
    private double totalPrice;
    private LocalDateTime createTime;
    private List<String> remarks;
    
    public Order(String orderId, List<Item> items, OrderStatus status, double totalPrice, LocalDateTime createTime) {
        this.orderId = orderId;
        this.items = new ArrayList<>(items);
        this.status = status;
        this.totalPrice = totalPrice;
        this.createTime = createTime;
        this.remarks = new ArrayList<>();
    }

    public String getOrderId() {
        return orderId;
    }
    
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    
    public List<Item> getItems() {
        return items;
    }
    
    public void setItems(List<Item> items) {
        this.items = items;
    }
    
    public OrderStatus getStatus() {
        return status;
    }
    
    public void setStatus(OrderStatus status) {
        this.status = status;
    }
    
    public double getTotalPrice() {
        return totalPrice;
    }
    
    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    
    public List<String> getRemarks() {
        return remarks;
    }
    
    public void addRemark(String remark) {
        this.remarks.add(remark);
    }
    
    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", items=" + items +
                ", status=" + status +
                ", totalPrice=" + totalPrice +
                ", createTime=" + createTime +
                ", remarks=" + remarks +
                '}';
    }
} 